/**
 *
 * Copyright 1991-2010 TEAM International. All rights reserved 
 *
 */
package com.lindenvalley.de.content.response;

import java.util.ArrayList;
import java.util.List;

import org.simpleframework.xml.Attribute;
import org.simpleframework.xml.ElementList;
import org.simpleframework.xml.Root;

/**
 * @author RuslanI
 *
 */
@Root(strict=false, name="s")
public class ResponseSection {

	@Attribute(name="sid", required=false)
	private int sectionId;
	
	@ElementList(inline=true, required=false)
	private List<ResponseRound> rounds;

	/**
	 * @param roundId the round_id to set
	 */
	public void setSectionId(int roundId) {
		this.sectionId = roundId;
	}

	/**
	 * @return the round_id
	 */
	public int getSectiond() {
		return sectionId;
	}

	/**
	 * @param rounds the questions to set
	 */
	public void setRounds(List<ResponseRound> rounds) {
		this.rounds = rounds;
	}

	/**
	 * @return the questions
	 */
	public List<ResponseRound> getRounds() {
		return rounds;
	}
	
	public void addRound(ResponseRound round){
		if (rounds == null)
			rounds = new ArrayList<ResponseRound>();
		rounds.add(round);
	}
	
}
